This disclosure relates to reading a potentiometer, and more particularly, to digitally reading an analog potentiometer without the need for an ADC (Analog to Digital Converter).
Traditionally, both PC (Personal Computer) and USB (Universal Serial Bus) gamepads have been simple xe2x80x9cdigitalxe2x80x9d devices, made of a set of buttons that are used for both directional control (e.g., arranged as a xe2x80x9cthumb padxe2x80x9d) and for feature activation such as firing weapons in a game. More recently, Game Consoles such as the Sony(copyright) Playstation(copyright) and Microsoft(copyright) Xbox(trademark) have been developed to support gamepads that provide various analog controls, including xe2x80x9cthumb sticksxe2x80x9d for directional control and xe2x80x9cproportional triggers.xe2x80x9d Providing such analog controls allows the game user to have a more xe2x80x9cnaturalxe2x80x9d gaming experience, which in turn increases his or her enjoyment in playing the games.
Analog position-sensing controls used by some gamepads and joysticks typically use potentiometers to generate a variable voltage based on the position of the control. This approach requires an expensive ADC to convert the analog signals into digital values that can be manipulated by a microprocessor. Additionally, the analog sensors are susceptible to various electrical conditions including center-point calibration, temperature drift, and noise.
Connected Xbox(trademark) game peripherals communicate with their game console using a restricted implementation of the USB implementation. Typically, the peripherals incorporate both a USB peripheral manager to manage the game controller functions and a USB hub to provide an interface for xe2x80x9cadd-inxe2x80x9d modules, such as memory cards, which may be inserted into the peripheral. Common peripheral implementations use a USB hub microcontroller together with an external ADC (used to read the potentiometers), or use a standard USB hub IC together with a USB peripheral microcontroller having an integrated ADC.
Embodiments of the invention address the concerns discussed above.
Embodiments of the invention include a method that allows nearly any microcontroller to accurately read a potentiometer with minimal external components. Some embodiments include two capacitors connected to the respective ends of a potentiometer, which can be charged or discharged simultaneously by a current source or current sink attached to the wiper of the potentiometer. The time when the voltage of each capacitor charges or discharges to a predetermined level is recorded and subsequently used to determine the position of the wiper on the potentiometer. Some embodiments of the invention includes, for example, first and second charge storage devices coupled to a physical input device; and a circuit for determining a position of the physical input device by comparing charge or discharge time for the first and second charge storage devices.